<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/echarts.js"></script>
    <style>
        .box {
            width: 600px;
            height: 400px;
            border: 1px solid #999;
            display: block;
        }
    </style>
</head>

<body>
    <div id="box1" class="box"></div>
    <script>
        let box1Chart = echarts.init(document.querySelector("#box1"));
        box1Chart.setOption({
            tooltip: {
               
            },
            legend: {
               
            },
            series: [
                {
                    name: "销量",
                    type: "pie",
                    left:10,
                    radius:[0,100],//数组的第一项是内半径，第二项是外半径
                    center:[400,180],//圆心坐标
                    selectedMode:"series",//'single'，'multiple'，'series'
                    data: [
                        {
                            name: "衬衫",
                            value: 100
                        },
                        {
                            name: "羊毛衫",
                            value: 200
                        },
                        {
                            name: "雪纺衫",
                            value: 120
                        },
                        {
                            name: "裤子",
                            value: 230
                        }
                    ]
                }
            ]
        });
    </script>
</body>

</html>